const
  DIGITS = '01';

var
  N, d: longint;
  s: string;

begin
  read(N);
  s := '';
  while N<>0 do begin
    d := N mod -2;
    s := DIGITS[abs(d) + 1] + s;
    N := N div -2;
    if d < 0 then
      N := N + 1;
  end;
  writeln(s);
end.
